Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Fix] forbid-prop-types: Ignore objects that are not of type React.PropTypes #3326

Merged
merged 1 commit into from
Aug 9, 2022

Conversation

TildaDares
Copy link
Contributor

Fixes #2722

@TildaDares
Copy link
Contributor Author

@ljharb Please review!

@codecov
Copy link

codecov bot commented Jul 8, 2022

Codecov Report

Merging #3326 (ec158dc) into master (c28ae9e) will decrease coverage by 0.01%.
The diff coverage is 95.45%.

❗ Current head ec158dc differs from pull request most recent head 6b330b8. Consider uploading reports for the commit 6b330b8 to get more accurate results

@@            Coverage Diff             @@
##           master    #3326      +/-   ##
==========================================
- Coverage   97.72%   97.71%   -0.02%     
==========================================
  Files         123      123              
  Lines        8822     8866      +44     
  Branches     3213     3240      +27     
==========================================
+ Hits         8621     8663      +42     
- Misses        201      203       +2     
Impacted Files Coverage Δ
lib/rules/forbid-prop-types.js 98.69% <95.45%> (-1.31%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Copy link
Member

@ljharb ljharb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Just one question.

lib/rules/forbid-prop-types.js Outdated Show resolved Hide resolved
lib/rules/forbid-prop-types.js Outdated Show resolved Hide resolved
lib/rules/forbid-prop-types.js Outdated Show resolved Hide resolved
lib/rules/forbid-prop-types.js Outdated Show resolved Hide resolved
@TildaDares TildaDares force-pushed the ignore-non-proptypes-objects branch from 1d5af2c to 5118610 Compare July 16, 2022 08:21
@TildaDares TildaDares requested a review from ljharb July 24, 2022 12:04
@ljharb ljharb force-pushed the ignore-non-proptypes-objects branch from 08a5366 to cecfc49 Compare August 4, 2022 23:38
@ljharb
Copy link
Member

ljharb commented Aug 4, 2022

@TildaDares i've rebased this, and added two "invalid" test cases, which seem to be failing.

@TildaDares
Copy link
Contributor Author

@ljharb All tests are passing now.

@ljharb ljharb force-pushed the ignore-non-proptypes-objects branch from ec158dc to 32e2700 Compare August 6, 2022 21:02
Copy link
Member

@ljharb ljharb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!

@ljharb ljharb changed the title forbid-prop-types: Ignore objects that are not of type React.PropTypes [Fix] forbid-prop-types: Ignore objects that are not of type React.PropTypes Aug 6, 2022
@ljharb ljharb force-pushed the ignore-non-proptypes-objects branch from 32e2700 to 17e19e5 Compare August 8, 2022 23:35
@ljharb
Copy link
Member

ljharb commented Aug 8, 2022

I added a missing test case, and removed the "import declaration node with no specifiers" - both because i believe it can't ever be hit, and also because it won't crash in that case anyways. This should be ready to merge once tests pass.

@ljharb ljharb force-pushed the ignore-non-proptypes-objects branch from 17e19e5 to 6b330b8 Compare August 9, 2022 02:59
@ljharb ljharb merged commit 6b330b8 into jsx-eslint:master Aug 9, 2022
@TildaDares TildaDares deleted the ignore-non-proptypes-objects branch August 9, 2022 06:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

forbid-prop-types warning shown on Yup validation
2 participants